var cookieSearch; (function(){var g={faqSearch:function(d,c){d.target="a.faqSearch-icon";d.stopPropagation();d.preventDefault();_fnFaqSearchDTM(d);if($(d.target).parents(".faqSearch-wrapper").hasClass("disabled")||!0===d.handled)return!1;var b=$(d.target).parents(".faqSearchForm"),a=b.attr("action"),f=b.attr("data-disable-auto-suggest"),e=b.attr("data-paramappend"),h=b.find(".faqSearch-input"),k=h.val(),r=b.attr("data-height"),t=b.attr("data-width"),l=b.attr("data-window"),m=a,n={direction:"left",mode:"hide"},p={direction:"left", mode:"show"},q=null;"true"==c&&(k=$(".swiftype-widget .result.active").text());b.find(".faqSearch-wrapper").addClass("searching");g.isSmallDevice||(b.find(".faqSearch-icon").effect("slide",n,1E3),b.find(".faqSearch-dynText").effect("slide",p,1E3),q=setInterval(function(){b.find(".faqSearch-dynText").toggleClass("clicked",500)},600));k===h.attr("data-placeholder")&&(k="");m="true"===e?a+encodeURIComponent(k):a+"#stq\x3d"+encodeURIComponent(k);"_self"===l&&h.blur().focusout();parseInt(f)?window.open(m, l,"fullscreen\x3d0,left\x3d250,top\x3d50,scrollbars\x3dyes,menubar\x3dno,height\x3d"+r+",width\x3d"+t+",resizable\x3dyes,toolbar\x3dno,status\x3dno"):"_self"===l?window.open(m,"_self"):window.open(m,"_blank");setTimeout(function(){b.find(".faqSearch-wrapper").removeClass("textenter");g.isSmallDevice||(clearInterval(q),n.direction="right",b.find(".faqSearch-dynText").effect("slide",n,1E3),b.find(".faqSearch-icon").effect("slide",p,1E3));h.val("");b.find(".faqSearch-wrapper").removeClass("searching").addClass("disabled"); "_blank"===l&&h.blur().focusout()},2500);d.handled=!0;$(".swiftype-widget .autocomplete ul").remove()},init:function(){function d(){""===$(".faqSearch-input").val().trim()?(b.show(),b.css("margin-top","8px"),c.append(b),$(".faqSearch-container").css("border","2px solid #cf223f"),$(".faqSearch-wrapper .faqSearch-container").on("foucs",function(){$(this).css("border-color","red")})):(b.hide(),$(".faqSearch-container").css("border",""))}var c=$("form .faqSearch-wrapper");0!=c.length&&c.find(".faqSearch-input").each(function(){var a= $(this),f=a.attr("data-placeholder"),e=a.closest(".faqSearch-wrapper");a.val()||""==a.val()||a.val()===f?e.addClass("disabled"):e.removeClass("disabled")});$("#st-brand-value").attr("value",$(".swiftype[name\x3d'swiftBrand']").attr("content"));$("#st-section-value").attr("value",$(".swiftype[name\x3d'swiftSegment']").attr("content"));c.on("click",".faqSearch-icon",g.faqSearch);c.on("focus focusin",".faqSearch-input,.faqSearch-icon",function(){$(this).closest(".faqSearch-wrapper").addClass("focus")}); c.on("blur focusout",".faqSearch-input,.faqSearch-icon",function(){$(this).closest(".faqSearch-wrapper").removeClass("focus")});c.on("keypress keyup",".faqSearch-input",function(a){var f=$(a.target),e=f.closest(".faqSearch-wrapper");f=$.trim(f.val());13!==a.which&&13!==a.keyCode||"keypress"!==a.type?1<=f.length?(e.removeClass("disabled"),e.addClass("textenter")):(e.removeClass("textenter"),e.addClass("disabled")):(a.preventDefault(),g.faqSearch(a));13==a.keyCode&&g.faqSearch(a,"true")});$(".faqSearch-input").on("keydown", function(a){9!=a.keyCode||a.shiftKey||$(".faqSearch-icon").focus();9==a.keyCode&&a.shiftKey&&$("*[tabindex\x3d'0']:visible, a[tabindex!\x3d'-1']:visible, button[tabindex!\x3d'-1']:visible, input[tabindex!\x3d'-1']:visible").eq($("*[tabindex\x3d'0']:visible, a[tabindex!\x3d'-1']:visible, button[tabindex!\x3d'-1']:visible, input[tabindex!\x3d'-1']:visible").index(this)-1).focus()});c.on("keyup",".faqSearch-input",function(a){9==a.keyCode&&$(this).closest(".faqSearch-container").addClass("focusadded")}); c.on("blur",".faqSearch-input",function(a){$(this).closest(".faqSearch-container").removeClass("focusadded")});$(document).on("click",".swiftype-widget .autocomplete",function(){c.focus()});var b=$("\x3cdiv\x3e",{id:"errorMessage","aria-label":"errormessage",role:"alert"}).addClass("error_message").text("Please enter a keyword").hide();c.on("click keyup",".faqSearch-icon",function(a){"click"!==a.type&&13!==a.which&&13!==a.keycode||d()});c.on("focus input",function(){b.hide();$(".faqSearch-container").css("border", "")});setTimeout(function(){var a=$(".faqSearch-container").width()+"px";$(".swiftype-widget .autocomplete").css("width",a)},100);$(document).on("click",".swiftype-widget .result",function(a){g.faqSearch(a,"true")});c.each(function(){var a="_blank"==$(".faqSearchForm").attr("data-window")?"-search will open in a new window":"";0<$(this).find("label").length&&c.find(".faqSearch-input").attr("aria-label",$(this).find("label").text()+a)})}};$(document).ready(function(){g.init()});$(window).resize(function(){setTimeout(function(){var d= $(".faqSearch-container").width()+"px";$(".swiftype-widget .autocomplete").css("width",d)},100)})})();